package acm.europe2005.southwestern;

import java.util.Arrays;
import java.util.Scanner;


public class p2404 {

	static int N, L;
	static int[] l;

	public static void main(String[] args) throws Exception {
//		Scanner scanner = new Scanner(new File("tests/01.in"));
		Scanner scanner = new Scanner(System.in);
		N = scanner.nextInt();
		L = scanner.nextInt();
		l = new int[N+1];
		for (int i=1;i<=N;++i) {
			l[i] = scanner.nextInt();
		}
		Arrays.sort(l,1, N+1);
//		for (int i=1;i<=N;++i) {
//			System.out.print(l[i] + " ");
//		}
//		System.out.println();
		int low = 1;
		int count = 0;
		for (int i=N;i>=low;--i) {
			if (i > low) {
				if (l[i] + l[low] <= L) {
					low++;
				}
			}
			++count;
		}
		System.out.println(count);
	}

}
